# -*- coding: utf-8 -*-
#gunicorn -c gunicorn.conf.py app.wsgi:application

import logging
import logging.handlers
from logging.handlers import WatchedFileHandler
import os
import multiprocessing

bind = "0.0.0.0:80"   #绑定的ip与端口
backlog = 2048        #监听队列数量，64-2048
chdir = "./apps"      #manage.py 在的目录
workers = multiprocessing.cpu_count() * 2 + 1 #根据cpu的数量启动进程。
worker_class = 'gevent' # 工作模式协程
worker_connections = 10000 # 设置最大并发量
#
# 设置访问日志和错误信息日志路径
accesslog = './logs/gunicorn_access.log'
errorlog = './logs/gunicorn_error.log'
# 设置日志记录水平
loglevel = 'info'

# 设置进程文件目录
pidfile = './logs/gunicorn.pid'